/**
 * Copyright (C) 2018-2022
 * All rights reserved, Designed By www.dynread.com
 * 注意：
 * 本软件为www.dynread.com开发研制，项目使用请保留此说明
 */
package com.dynread.mall.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dynread.common.core.domain.BaseModel;
import com.dynread.framework.config.typehandler.ArrayStringTypeHandler;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.JdbcType;

import java.math.BigDecimal;

/**
 * spu商品
 *
 * @author drinvay
 * @date 2022/5/6 0:24
 */
@Data
@TableName("goods_spu")
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "spu商品")
public class GoodsSpu extends BaseModel {
    private static final long serialVersionUID = 1L;

    /**
     * spu编码
     */
    @ApiModelProperty(value = "spu编码")
    private String spuCode;

    /**
     * spu名称
     */
    @ApiModelProperty(value = "spu名称")
    private String name;

    /**
     * 卖点
     */
    @ApiModelProperty(value = "卖点")
    private String sellPoint;

    /**
     * 描述
     */
    @ApiModelProperty(value = "描述")
    private String description;

    /**
     * 一级分类ID
     */
    @ApiModelProperty(value = "一级分类ID")
    private String categoryFirst;

    /**
     * 二级分类ID
     */
    @ApiModelProperty(value = "二级分类ID")
    private String categorySecond;

    /**
     * 商品主图
     */
    @ApiModelProperty(value = "商品主图")
    @TableField(typeHandler = ArrayStringTypeHandler.class, jdbcType = JdbcType.VARCHAR)
    private String[] picUrls;

    /**
     * 是否上架（0否 1是）
     */
    @ApiModelProperty(value = "是否上架（0否 1是）")
    private String shelf;

    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")
    private Integer sort;

    /**
     * 销售价格
     */
    @ApiModelProperty(value = "销售价格")
    private BigDecimal salesPrice;

    /**
     * 市场价
     */
    @ApiModelProperty(value = "市场价")
    private BigDecimal marketPrice;

    /**
     * 成本价
     */
    @ApiModelProperty(value = "成本价")
    private BigDecimal costPrice;

    /**
     * 成本
     */
    @ApiModelProperty(value = "库存")
    private Integer stock;

    /**
     * 销量
     */
    @ApiModelProperty(value = "销量")
    private Integer saleNum;
}
